package com.qiangqiang.task.server.controller;

import com.qiangqiang.task.server.service.CommissionService;
import com.qiangqiang.task.server.util.ResultVOUtil;
import com.qiangqiang.task.server.vo.ResultVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: task
 * @description:
 * @author: Sky.lin
 * @create: 2019-03-11 15:55
 **/
@RestController
@RequestMapping(value = "/commission")
public class CommissionController {

    @Autowired
    private CommissionService commissionService;

    @GetMapping("/showAllCommissionRecord")
    public ResultVO showAllCommissionRecord(@Param("userId") long userId) {
        return ResultVOUtil.success(commissionService.findAllCommissionByUserId(userId));
    }
}
